package edu.dayu.controller;

import edu.dayu.pojo.Person;
import edu.dayu.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class PersonController {
    @Autowired
    private PersonService personService;

    @GetMapping("/queryPerson/{name}")
    public List<Person> queryPerson(@PathVariable String name){
        return personService.queryPerson(name);
    }
}
